package com.bipbip.modelo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.Data;

import org.springframework.context.annotation.Scope;

@Entity
@Table(name = "Empresa")
@Scope("session")
public @Data class Empresa {

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;
	
	@Column(name = "razon_social")
	private String razon_social;
	
	@Column(name = "direccion")	
	private String direccion;
	
	@Column(name = "telefono")
	private String telefono;
	
	@Column(name = "nombre")
	private String nombre;
	
	@Column(name = "cp")
	private String cp;
	
	@ManyToOne
	@JoinColumn(name = "idPais")
	private Pais pais;

}
